package service.impl;

import bean.Movie;
import dao.MovieDao;
import dao.impl.MovieDaoImpl;
import service.MovieService;

import java.util.List;

public class MovieServiceImpl implements MovieService {
    private MovieDao movieDao = new MovieDaoImpl();
    @Override
    public List<Movie> getAllMovie() {
        return movieDao.getAllMovie() ;
    }

    @Override
    public Movie getMovieById(int movieId) {
        return movieDao.getMovieById(movieId);
    }

    @Override
    public List<Movie> getMoviesByKey(String key) {
        return movieDao.getMoviesByKey(key);
    }

    public boolean deleteMovie(int movieId) {
        return movieDao.deleteMovie(movieId);
    }

    @Override
    public boolean modifyMovie(Movie movie) {
        return movieDao.modifyMovie(movie);
    }

}
